package com.teach.mapper;

import com.teach.entity.TbPrize;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

/**
 * @Entity com.teach.entity.TbPrize
 */
@Mapper
public interface TbPrizeMapper extends BaseMapper<TbPrize> {

    @Select(value = "SELECT pr.prize,pr.lucky,pr.status FROM tb_prize AS pr where pr.status=0")
    List<TbPrize> selectPrizeStatus();

    @Select(value = "SELECT pr.prize,pr.lucky FROM tb_prize AS pr where pr.lucky=#{count}")
    TbPrize selectLuky(@Param(value = "count") Integer count);
}




